#!/bin/bash
dir1=/home/jxc/文档/gits/note
dir2=/run/user/1000/gvfs/smb-share:server=192.168.200.247,share=信息部/冀炫呈/报告
file=待处理事项.md
rename=待处理事项$(date +"%Y-%m-%d-%H%M%S").md
if [ ! -e $dir2/$file ];then
	cp -rf $dir1/$file $dir2/$file
else
	case $1 in
		install)
			sudo cp $0 /usr/local/bin/cp.sh;;
		up)
			rm -rf $dir2/$file
			cp -rf $dir1/$file $dir2/$file;;
		bag)
			cd $dir1
			cp -rf $file $dir2/$rename;;
		*)
			echo "install	安装脚本至本地"
			echo "up	同步文件"
			echo "bag	打包文件"
	esac
fi
